import request from '@/utils/request'

/**
 * 获取部门列表
 */
export const getDepartmentApi = () => request({
  url: '/company/department'
})
export const getManagerListApi = () => request({ url: '/sys/user/simple' })
export const addDepartmentApi = (data) => request.post('/company/department', data)

export const getDepartmentDetailApi = (id) => request(`/company/department/${id}`)

export const updateDepartmentApi = (data) => request({
  method: 'put',
  url: `/company/department/${data.id}`,
  data
})

export const delDepartmentApi = (id) => request({
  method: 'delete',
  url: `/company/department/${id}`
})
